package com.qiye.pointsserver.common.PageUtil;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Data;

import java.util.List;


@Data
public class PageResult<T> {
    private long total;          // 总条数
    private List<T> records;     // 当前页数据
    private long pages;          // 总页数
    private long current;        // 当前页

    public PageResult(IPage<T> page) {
        this.total = page.getTotal();
        this.records = page.getRecords();
        this.pages = page.getPages();
        this.current = page.getCurrent();
    }

}

